<?php

namespace App\Http\Controllers\App;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Controllers\App\BaseController;
use App\Models\Action;

class HomeController extends Controller
{
    /**
     * 菜单列表
     * @return [type] [description]
     */
    public function HomeMenu(Request $request) 
    {


        $actionModel = new Action();

        if (session('admin_level') == 1) {
            $action = [];
        } else {
            $action = session('admin_menu');
        }

        $list = $actionModel->getMenu($action);

        return self::json($list);
    }   
}
